package com.bawei.mvvm.respository;

import com.bawei.mvvm.entity.ApiResponse;
import com.bawei.mvvm.entity.Goods;
import com.bawei.mvvm.http.ApiService;
import com.bawei.mvvm.http.RetrofitManager;

import java.util.List;


import androidx.lifecycle.LiveData;
import androidx.lifecycle.MutableLiveData;
import retrofit2.http.Query;

//仓库:网络请求数据MutableLiveData
public class MainRepository {

    public LiveData<ApiResponse<List<Goods>>> goods(int category_id, int currentPage, int pageSize){
       return RetrofitManager.getInstance()
                .getRetrofit()
                .create(ApiService.class)
                .goods(category_id, currentPage, pageSize);
    }
}
